The present invention relates generally to the field of computers and computer systems. More particularly, the present invention relates to a method and apparatus for dynamic boot block configuration.
In a typical computer system, a read only memory (ROM) is employed to store non-volatile code that is used to initialize the computer system upon startup and to perform other housekeeping tasks for the computer system. For example, in a personal computer (PC) architecture, a motherboard is equipped with a non-volatile memory device such as a electronically programmable read only memory (EPROM) or a flash memory boot block device that stores Basic Input/Output System (BIOS) code. BIOS code includes software routines that provide a low-level interface to devices in the computer system.
The BIOS is built-in software that determines what a computer can do without accessing programs from a disk. On many PCs, the BIOS contains all the code required to control the keyboard, display screen, disk drives, serial communications, and a number of miscellaneous functions. The BIOS is typically placed in a ROM device that comes with the computer. This type of device is also called a ROM BIOS. This technique ensures that the BIOS will always be available and will not be damaged by disk failures. The BIOS makes it possible for a computer to boot itself. Because random access memory (RAM) is faster than ROM, some computer manufacturers design systems so that the BIOS is copied from ROM to RAM each time the computer is booted. This is known as shadowing.
Many modern PCs have a flash BIOS, which means that the BIOS has been recorded on a flash memory chip, which can be updated if necessary. The PC BIOS is fairly standardized, so all PCs are fairly similar, although there are different BIOS versions. Additional DOS functions are usually added through software modules. Hence users can upgrade to a newer version of DOS without changing the BIOS.
PC BIOS that can handle Plug-and-Play (PnP) devices are known as PnP BIOS or PnP-aware BIOS. PnP BIOS are typically implemented with flash memory rather than ROM. Flash memory devices are typically used for applications requiring non-volatility and in-circuit programmability. Typically, flash memory devices contain separately erasable flash block; namely, each flash block can be erased independently of other flash blocks. To update a particular block, the block is first erased. Data is then written to the erase block.
Flash technology allows blocks of the non-volatile memory to be erased and rewritten without having to remove the flash memory device from the motherboard. In order to prevent the loss of important boot code, certain flash memory devices incorporate a boot block feature. Internal circuits in these memories ensure that all blocks except the boot block are erasable. The controller for these devices typically have two modes of operation: a normal mode and a recovery mode. In the normal mode, the BIOS code contained in the memory is executed. In the recovery mode, the computer system can utilize the code in the boot block section to boot a diskette and rebuild the BIOS code after an error is detected in the BIOS.
Depending on the particular architecture, a processor can be top or bottom boot. The processor boot configuration determines whether the processor is seeking boot code from starting from the bottom of the memory space or from the top. Prior art memory devices are designed to be either top boot or bottom boot. Hence a bottom boot device cannot be used in a top boot system, and vice versa. As a result, memory manufacturers need to include two separate line items in the product line to handle application requirements. Extra time and effort are also spent in design process and manufacturing flow since line items add complexity to the part. Distributors and customers are also force to maintain inventories of two types of memories.
A method for dynamic boot block configuration is described. The method of one embodiment first receives a first address. The first address is then decoded. A determination is made as to whether the first address indicates a top boot address.